#include "clientSession.h"
//const char *rootPath = "/home/cc/cpp69/cloudiskTest/";

int clientSessionInit(clientSession_t *pClientSession)
{
    bzero(pClientSession, sizeof(clientSession_t));
    folderStackInit(&pClientSession->folderStack);

    /* 安全拷贝，确保以 '\0' 结尾 */
    strncpy(pClientSession->truePath, g_root_path, sizeof(pClientSession->truePath) - 1);
    pClientSession->truePath[sizeof(pClientSession->truePath) - 1] = '\0';

    strncpy(pClientSession->virtualPath, "/", sizeof(pClientSession->virtualPath) - 1);
    pClientSession->virtualPath[sizeof(pClientSession->virtualPath) - 1] = '\0';

    return 0;
}

